import Main from '@/components/main'

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: true,
          title: '首页',
          notCache: true,
          icon: 'md-home'
        },
        component: () => import('@/view/single-page/home')
      }
    ]
  },
  {
    path: '/bid',
    name: 'bid',
    meta: {
      title: '招标管理'
    },
    component: Main,
    children: [
      {
        path: 'player_info',
        name: 'player_info',
        meta: {
          icon: 'md-game-controller-b',
          title: '招标管理'
        },
        component: () => import('@/view/single-page/home')
      }
    ]
  },
  {
    path: '/settle',
    name: 'settle',
    meta: {
      title: '结算管理'
    },
    component: Main,
    children: [
      {
        path: 'settle_manager',
        name: 'settle_manager',
        meta: {
          icon: 'logo-yen',
          title: '结算管理'
        },
        component: () => import('@/view/single-page/home')
      }
    ]
  },
  {
    path: '/operation',
    name: 'operation',
    meta: {
      title: '运维管理'
    },
    component: Main,
    children: [
      {
        path: 'permission_distribute',
        name: 'permission_distribute',
        meta: {
          icon: 'md-build',
          title: '权限分配'
        },
        component: () => import('@/view/access-control/distribute-access.vue')
      },
    ]
  },
  // 保留，用于错误页面跳转
  {
    path: '/error_logger',
    name: 'error_logger',
    meta: {
      hideInBread: true,
      hideInMenu: true
    },
    component: Main,
    children: [
      {
        path: 'error_logger_page',
        name: 'error_logger_page',
        meta: {
          icon: 'ios-bug',
          title: '错误收集'
        },
        component: () => {
        }
      }
    ]
  },
  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/404.vue')
  }
]
